<div class="site-title">
    <fieldset>
        <legend><a>${title}</a></legend>
    </fieldset>
</div>
<div class="layui-row" style="margin-top: 32px">
    <div class="layui-form" action="">
        <input type="hidden" name="id" value="<#if isEdit>${vo.id?c}</#if>">
        <div class="layui-form-item">
            <label class="layui-form-label">日期</label>
            <div class="layui-input-inline">
                <input id="activity_date" type="text" name="date" required lay-verify="required" placeholder="请输入日期"
                       autocomplete="off" class="layui-input" value="<#if isEdit>${vo.date?string('yyyy-MM-dd')}</#if>">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">日记</label>
            <div class="layui-input-block">
                <textarea type="text" name="content" class="layui-input"><#if isEdit>${vo.content}</#if></textarea>
            </div>
        </div>
        <div class="layui-form-item" id="imageUploaderContainer">
            <div class="layui-col-md1">
                <label class="layui-form-label">图片上传</label>
            </div>
            <div class="layui-col-md9 upload-content">
                <div class="content-img">
                    <ul class="content-img-list">
                        <#if isEdit>
                            <#if vo.imgPath?has_content>
                                <li class="content-img-list-item">
                                    <img src="/images/${vo.imgPath}"
                                         alt=""><a index="0"
                                                   class="delete-btn layui-hide"><i
                                                class="layui-icon layui-icon-delete"></i></a>
                                </li>
                            </#if>
                        </#if>
                    </ul>
                    <div class="file">
                        <i class="layui-icon layui-icon-add-1"></i>上传图片，支持jpg/png<input type="file" name="file"
                                                                                        accept="image/*"
                                                                                        id="imageUploader">
                    </div>
                </div>
                <div class="upload-tips">
                    图片大小限制5M
                </div>
            </div>
        </div>

        <div class="layui-row">
            <div class="layui-input-block layui-col-md8">
                <button class="layui-btn" lay-submit lay-filter="activity_submit" id="activity_submit">提交</button>
            </div>
        </div>
    </div>
</div>